import request from '../utils/request'

// 会话管理

export function getSessions() {
    return request({
        url: '/chat/sessions/user',
        method: 'get',
    })
}

export function deleteSession(sessionId) {
    return request({
        url: `/chat/session/${sessionId}`,
        method: 'delete'
    })
}

export function updateSession(data) {
    return request({
        url: '/chat/session',
        method: 'put',
        data: data
    })
}




// 消息管理
export function getChatMessages(sessionId) {
    return request({
        url: '/chat/messages',
        method: 'get',
        params: {sessionId}
    })
}

